<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>add</title>
		<script charset="utf-8" src="<?php echo base_url();?>public/kindeditor/kindeditor-all-min.js"></script>
		<script charset="utf-8" src="<?php echo base_url();?>public/kindeditor/lang/zh-CN.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create(["#content"]);
				})
		</script>
		<?php include("header.php");?>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="col-md-9 col-md-offset-1">.
				<h1 >修改文章</h1>	
				<form action=""  class="form-horizontal"  method="post" enctype="multipart/form-data">
					<div class="form-group">
						<label class="col-sm-2 control-label">catalog_id</label>
						<div class="col-sm-3">
							<select class="form-control" name="catalog_id">
								<?php foreach ($navs as  $nav) { ?>
								<option <?php if($article->catalog_id == $nav->id){?>selected="selected"<?php }?> value="<?php echo $nav->id;?>"><?php echo $nav->name;?></option>
								<?php } ?>	
							</select>
							<?php echo form_error('catalog_id'); ?>
						</div>
					</div>
				
					<div class="form-group">
						<label class="col-sm-2 control-label">title</label>
						<div class="col-sm-6">
							<input type="text" class="form-control" name="title" value="<?php echo $article->title;?>" />
							<?php echo form_error('title'); ?>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">desc</label>
						<div class="col-sm-10">
							<textarea class="form-control" name="desc" rows="5"><?php echo $article->desc;?></textarea>
							<?php echo form_error('desc'); ?>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">content</label>
						<div class="col-sm-10">
							<textarea class="form-control"  name="content" id="content"><?php echo $article->content;?></textarea>
							<?php echo form_error('content'); ?>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">img</label>
						<div class="col-sm-10">
							<input class="form-control"  name="img" value="<?php $article->img;?>" />
							<?php echo form_error('img'); ?>
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-10">
							<button type="submit" class="btn  btn-success"><a href="#">提交</a></button>
							<button type="submit" class="btn  btn-success"><a href="#">返回</a></button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>

